<?php

/**
 * 台湾CMS系统 twCMS
 *
 * (c) cighsen02 <xiayu@959602.com>
 *
 * Create at：2024.10.13
*/

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\View\View;

class DashboardController extends Controller
{
    /**
     * 会员面板
     *
     * @return View
     */
    public function dashboard(Request $request, string $accountType): View
    {
        $user = $request->user();
        // 副表
        // $user = Auth::user()->load('add');
        $user->getAllPermissions();
// dd($user->roles->pluck('name','name')->all());
        return view('auth.dashboard', [
            'title' => '控制面板',
            'accountType' => $accountType,
            'user' => $user
        ]);
    }
}
